using System;
using System.Xml;

namespace umlungu.engineX.webX.thoughts.Admin.service {
	/// <summary>
	/// umlungu engineX web framework, handlerX class.
	/// </summary>
	public class Blog : SoapX
	{
		/// <summary>Constructor</summary>
		public Blog() : base("service", "Blog") {
		}
		/// <summary>
		/// Method _Process:: calls delegate(s)
		/// </summary>
		protected override void _Process(XmlDocument xmldom, profileX profile, contentX content) {
			_Debug("Blog._Process(", Process, ") profile:", profile.Xml.InnerXml);
			_Debug("Blog._Process(", Process, ") content:", content.Xml.InnerXml);
			switch (Process) {
				case "GetBlogList":			ProcessResult(new ProcessServiceResult(Handlers.processGetBlogList));		break;
				case "GetBlogListDef":		ProcessResult(new ProcessServiceResult(Handlers.processGetBlogListDef));	break;
				case "GetBlogListAll":		ProcessResult(new ProcessServiceResult(Handlers.processGetBlogListAll));	break;
				case "AddCustom":
				case "Add":					ProcessResult(new ProcessServiceResult(Handlers.processAdd));				break;
				case "AddHtml":
				case "AddHtmlXml":
				case "AddHtmlDate":			ProcessResult(new ProcessServiceResult(Handlers.processAddHtml));			break;
				case "AddText":				ProcessResult(new ProcessServiceResult(Handlers.processAddText));			break;
				case "AddImage":			ProcessResult(new ProcessServiceResult(Handlers.processAddImage));			break;
				case "Edit":				ProcessResult(new ProcessServiceResult(Handlers.processEdit));				break;
				case "EditHtml":
				case "EditHtmlDate":		ProcessResult(new ProcessServiceResult(Handlers.processEditHtml));			break;
				case "EditText":			ProcessResult(new ProcessServiceResult(Handlers.processEditText));			break;
				case "EditHtmlXml":			SubDir = profile.GetProfileValue("BlogSpaces");
											SubSubDir = profile.GetProfileValue("Topic");
											ProcessResult(new ProcessServiceResult(_ProcessDocument));
											ProcessResult(new ProcessServiceResult(Handlers.processEditHtml)); 
																														break;
				case "Delete":			
				case "DeleteDate":			ProcessResult(new ProcessServiceResult(Handlers.processDelete));			break;
				case "GetBlogView":			ProcessResult(new ProcessServiceResult(Handlers.processGetBlogView));		break;
				case "GetBlogEdit":			ProcessResult(new ProcessServiceResult(Handlers.processGetBlogEdit));		break;
				case "GetBlogEditCustom":	ProcessResult(new ProcessServiceResult(Handlers.processGetBlogEditCustom));	break;
				case "GetBlogEditAll":		ProcessResult(new ProcessServiceResult(Handlers.processGetBlogEditAll));	break;
				case "GetBlogDel":			ProcessResult(new ProcessServiceResult(Handlers.processGetBlogDel));		break;
				case "GetBlogDelCustom":	ProcessResult(new ProcessServiceResult(Handlers.processGetBlogDelCustom));	break;
				case "GetBlogDateEdit":		ProcessResult(new ProcessServiceResult(Handlers.processGetBlogDateEdit));	break;
				case "GetBlogDateDel":		ProcessResult(new ProcessServiceResult(Handlers.processGetBlogDateDel));	break;
				case "GetBlog":				ProcessResult(new ProcessServiceResult(Handlers.processGetBlog));			break;
				case "GetBlogComment":		ProcessResult(new ProcessServiceResult(Handlers.processGetBlogComment));	break;
				case "GetCommentEdit":		ProcessResult(new ProcessServiceResult(Handlers.processGetCommentEdit));	break;
				case "GetCommentDel":		ProcessResult(new ProcessServiceResult(Handlers.processGetCommentDel));		break;
				case "AddComment":			ProcessResult(new ProcessServiceResult(Handlers.processAddComment));		break;
				case "EditComment":			ProcessResult(new ProcessServiceResult(Handlers.processEditComment));		break;
				case "DeleteComment":		ProcessResult(new ProcessServiceResult(Handlers.processDeleteComment));		break;
				case "GetBlogImage":		ProcessResult(new ProcessServiceResult(Handlers.processGetBlogImage));		break;
				case "GetBlogImageEdit":	ProcessResult(new ProcessServiceResult(Handlers.processGetBlogImageEdit));	break;
				case "GetBlogImageDel":		ProcessResult(new ProcessServiceResult(Handlers.processGetBlogImageDel));	break;
				case "AddBlogImage":		ProcessResult(new ProcessServiceResult(Handlers.processAddBlogImage));
											SubDir = profile.GetProfileValue("BlogSpaces");
											SubSubDir = profile.GetProfileValue("Topic");
											ProcessResult(new ProcessServiceResult(_ProcessBlogImage));					break;
				case "EditBlogImage":		ProcessResult(new ProcessServiceResult(Handlers.processEditBlogImage));
											SubDir = profile.GetProfileValue("BlogSpaces");
											SubSubDir = profile.GetProfileValue("Topic");
											ProcessResult(new ProcessServiceResult(_ProcessBlogImage)); break;
				case "DeleteBlogImage":		ProcessResult(new ProcessServiceResult(Handlers.processDeleteBlogImage));	break;
				case "DefaultBlogImage":	ProcessResult(new ProcessServiceResult(Handlers.processDefaultBlogImage));	break;
			}
			_Debug("Blog._Process(", Process, ") profile:", profile.Xmldoc.OuterXml);
		}
	}
}
		
